package com.sharemarking.wa.platform.mapper;

import com.sharemarking.wa.common.entity.Order;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;

/**
 * @author dxy
 */
@Repository
public interface OrderPayMapper {
    @Update("UPDATE wa_order SET state = #{state},update_date = #{updateDate} WHERE code = #{code}")
    void updateOrderState(Order order);

    @Update("UPDATE wa_order SET payer = #{payer},update_date= #{updateDate} WHERE code = #{code}")
    void publisherPay(Order order);

    @Update("UPDATE wa_order SET state = #{state},update_date = #{updateDate},payer = #{payer} WHERE code = #{code}")
    void updateOrderStateAndPayer(Order order);
}
